﻿/*  代码由框架生成,任何更改都可能导致被代码生成器覆盖，可自行修改。
* SmTableCatalog.cs
*
*功 能： N / A
* 类 名： SmTableCatalog
*
* Ver    变更日期 负责人  变更内容
* ───────────────────────────────────
*V1.0  2024/4/22 9:47:50  SimonHsiao   初版
*
* Copyright(c) 2024 SUZHOU EU Corporation. All Rights Reserved.
*┌──────────────────────────────────┐
*│　此技术信息为本公司机密信息，未经本公司书面同意禁止向第三方披露．　│
*│　版权所有：SahHsiao                                │
*└──────────────────────────────────┘
*/
namespace EU.Core.Api.Controllers;

/// <summary>
/// 映射表(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_SM)]
public class SmTableCatalogController : BaseController<ISmTableCatalogServices, SmTableCatalog, SmTableCatalogDto, InsertSmTableCatalogInput, EditSmTableCatalogInput>
{
    public SmTableCatalogController(ISmTableCatalogServices service) : base(service)
    {
    }

    /// <summary>
    /// 初始化指定表
    /// </summary>
    /// <param name="id">映射表id</param>
    /// <returns></returns>
    [HttpPost, Route("InitAssignmentTable/{id}")]
    public async Task<ServiceResult> InitAssignmentTable(Guid id) => await _service.InitAssignmentTable(id);

    /// <summary>
    /// 初始化所有表
    /// </summary>
    /// <returns></returns>
    [HttpPost, Route("InitAllTable")]
    public async Task<ServiceResult> InitAllTable() => await _service.InitAllTable();
}